{extend name="base"}
{block name="title"}道具详情{/block}
{block name="head"}
<style>
    .tab-content dl dt {width:64px;}
    .tab-content dl dd {margin-left:70px;}
    textarea{max-width:300px; max-height:65px;}
</style>
{/block}
{block name="body"}
<body class="mainbody" style="padding:0;margin:0;">
<form>
    <div class="tab-content" style="border:1px solid #eee;padding:0 10px;">
        <dl><dt>所属渠道：</dt><dd>[{$item.Channel}]{$CHANNELS[$item.Channel]['Name'] ?? ''}</dd></dl>
        <dl><dt>道具名称：</dt><dd><input type="text" class="input normal" autocomplete="off" name="PropsName" value="{$item.PropsName??''}" /></dd></dl>
        <dl>
            <dt>道具索引：</dt>
            <dd>
                <input type="text" class="input small" autocomplete="off" name="PropsIndex" value="{$item.PropsIndex??0}" />
                <span class="Validform_checktip">*正整数[0-100]</span>
            </dd>
        </dl>
        <dl id="Type">
            <dt>道具类型：</dt>
            <dd>
                <div class="rule-multi-radio">
        <span style="display: none;">
        {foreach name="AWTYPES" item="val"}
          <input type="radio" name="PropsType" value="{$key}"{eq name="item.PropsType" value="$key"} checked{/eq} /><label>{$key}={$val}</label>
        {/foreach}
        </span>
                </div>
                <span class="Validform_checktip">*{$item.PropsType}</span>
            </dd>
        </dl>
        <dl id="Gold"{in name="item.PropsType*1" value="0"} style="display:none"{/in}>
        <dt>金币价值：</dt>
        <dd>
            <input type="text" class="input small" autocomplete="off" name="Gold" value="{$item.Gold??0}" />
            <span class="Validform_checktip">*金币数,正整数</span>
        </dd>
        </dl>
        <dl id="Card"{in name="item.PropsType*1" value="0"} style="display:none"{/in}>
        <dt>房卡价值：</dt>
        <dd>
            <input type="text" class="input small" autocomplete="off" name="Card" value="{$item.Card??0}" />
            <span class="Validform_checktip">*房卡数,正整数</span>
        </dd>
        </dl>

        <dl>
            <dt>记录插入描述：</dt>
            <dd>
                <textarea class="input" name="GameProsName">{$item.GameProsName??''}</textarea>
                <span class="Validform_checktip">*最长255字</span>
            </dd>
        </dl>
    </div>
</form>
<script>
    $(function () {

        $("dl#Type input[type='radio']").click(function () {
            var val = $(this).val();
            console.log("click", val);

            var dlReward = $('dl#Reward');
            var dlKindID = $('dl#KindID');
            var ipReward = $('input', dlReward);
            var ipKindID = $('select', dlKindID);;

            if (val == 0) { // 普通
                dlReward.hide();
                dlKindID.hide();
                ipReward.val(0);
                ipKindID.val(0);  //
                $('.select-items li', dlKindID).removeClass('selected');
                var eax = $('.select-items li:first', dlKindID).text();
                $('.select-tit span', dlKindID).text(eax);
            } else if (val == 1) {  // 金币
                dlReward.show();
                dlKindID.hide();
            } else if (val == 2) {  // 房卡
                dlReward.show();
                dlKindID.show();
            }
        });

    });
</script>
</body>
{/block}